﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_QC_IPQC_ORDER
// * CreateDate    : 2012/5/8 13:31:51
// * Creater       : CodeSmith
// * LastChangeDate: 2012/5/8 13:31:51
// * LastChanger   : 2012/5/8 13:31:51
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class QcIpqcOrderEntity : EntityBase
    {
        public QcIpqcOrderTable TableSchema
        {
            get
            {
                return QcIpqcOrderTable.Current;
            }
        }

        public QcIpqcOrderEntity()
        {

        }

        public QcIpqcOrderEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
            this.ProdPlanOrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["PROD_PLAN_ORDER_ITEM_ID"]));
            this.ProductTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TECHNIC_ID"]));
            this.OrderCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_CODE"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.CheckType = Convert.ToInt32(CommonFunctions.ToObject(dr["CHECK_TYPE"]));
            this.SampingParametersId = Convert.ToString(CommonFunctions.ToObject(dr["SAMPING_PARAMETERS_ID"]));
            this.CheckQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["CHECK_QTY"]));
            this.NgQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["NG_QTY"]));
            this.ResultTag = Convert.ToInt32(CommonFunctions.ToObject(dr["RESULT_TAG"]));
            this.CreateDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATE_DATE"]));
            this.CreateBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATE_BY"]));
            this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
            this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
            this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.CustomDefine1 = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOM_DEFINE1"]));
        }

        public QcIpqcOrderEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.OrderId = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_ID"]));
            this.ProdPlanOrderItemId = Convert.ToString(CommonFunctions.ToObject(dr["PROD_PLAN_ORDER_ITEM_ID"]));
            this.ProductTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_TECHNIC_ID"]));
            this.OrderCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_CODE"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
            this.CheckType = Convert.ToInt32(CommonFunctions.ToObject(dr["CHECK_TYPE"]));
            this.SampingParametersId = Convert.ToString(CommonFunctions.ToObject(dr["SAMPING_PARAMETERS_ID"]));
            this.CheckQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["CHECK_QTY"]));
            this.NgQty = Convert.ToDecimal(CommonFunctions.ToObject(dr["NG_QTY"]));
            this.ResultTag = Convert.ToInt32(CommonFunctions.ToObject(dr["RESULT_TAG"]));
            this.CreateDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATE_DATE"]));
            this.CreateBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATE_BY"]));
            this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
            this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
            this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.CustomDefine1 = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOM_DEFINE1"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return QcIpqcOrderTable.Current;
            }
        }

        #region Perporty List
        public string OrderId
        {
            get { return Convert.ToString(GetData(QcIpqcOrderTable.C_ORDER_ID)); }
            set { SetData(QcIpqcOrderTable.C_ORDER_ID, value); }
        }

        public string ProdPlanOrderItemId
        {
            get { return Convert.ToString(GetData(QcIpqcOrderTable.C_PROD_PLAN_ORDER_ITEM_ID)); }
            set { SetData(QcIpqcOrderTable.C_PROD_PLAN_ORDER_ITEM_ID, value); }
        }

        public string ProductTechnicId
        {
            get { return Convert.ToString(GetData(QcIpqcOrderTable.C_PRODUCT_TECHNIC_ID)); }
            set { SetData(QcIpqcOrderTable.C_PRODUCT_TECHNIC_ID, value); }
        }

        public string OrderCode
        {
            get { return Convert.ToString(GetData(QcIpqcOrderTable.C_ORDER_CODE)); }
            set { SetData(QcIpqcOrderTable.C_ORDER_CODE, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(QcIpqcOrderTable.C_STATUS)); }
            set { SetData(QcIpqcOrderTable.C_STATUS, value); }
        }

        public int CheckType
        {
            get { return Convert.ToInt32(GetData(QcIpqcOrderTable.C_CHECK_TYPE)); }
            set { SetData(QcIpqcOrderTable.C_CHECK_TYPE, value); }
        }

        public string SampingParametersId
        {
            get { return Convert.ToString(GetData(QcIpqcOrderTable.C_SAMPING_PARAMETERS_ID)); }
            set { SetData(QcIpqcOrderTable.C_SAMPING_PARAMETERS_ID, value); }
        }

        public decimal CheckQty
        {
            get { return Convert.ToDecimal(GetData(QcIpqcOrderTable.C_CHECK_QTY)); }
            set { SetData(QcIpqcOrderTable.C_CHECK_QTY, value); }
        }

        public decimal NgQty
        {
            get { return Convert.ToDecimal(GetData(QcIpqcOrderTable.C_NG_QTY)); }
            set { SetData(QcIpqcOrderTable.C_NG_QTY, value); }
        }

        public int ResultTag
        {
            get { return Convert.ToInt32(GetData(QcIpqcOrderTable.C_RESULT_TAG)); }
            set { SetData(QcIpqcOrderTable.C_RESULT_TAG, value); }
        }

        public DateTime CreateDate
        {
            get { return Convert.ToDateTime(GetData(QcIpqcOrderTable.C_CREATE_DATE)); }
            set { SetData(QcIpqcOrderTable.C_CREATE_DATE, value); }
        }

        public string CreateBy
        {
            get { return Convert.ToString(GetData(QcIpqcOrderTable.C_CREATE_BY)); }
            set { SetData(QcIpqcOrderTable.C_CREATE_BY, value); }
        }

        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(QcIpqcOrderTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(QcIpqcOrderTable.C_LAST_MODIFIED_DATE, value); }
        }

        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(QcIpqcOrderTable.C_LAST_MODIFIED_BY)); }
            set { SetData(QcIpqcOrderTable.C_LAST_MODIFIED_BY, value); }
        }

        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(QcIpqcOrderTable.C_APPROVED_DATE)); }
            set { SetData(QcIpqcOrderTable.C_APPROVED_DATE, value); }
        }

        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(QcIpqcOrderTable.C_APPROVED_BY)); }
            set { SetData(QcIpqcOrderTable.C_APPROVED_BY, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(QcIpqcOrderTable.C_REMARK)); }
            set { SetData(QcIpqcOrderTable.C_REMARK, value); }
        }

        public string CustomDefine1
        {
            get { return Convert.ToString(GetData(QcIpqcOrderTable.C_CUSTOM_DEFINE1)); }
            set { SetData(QcIpqcOrderTable.C_CUSTOM_DEFINE1, value); }
        }

        #endregion
    }


}

